package com.paziy.jan.fraction;

import com.paziy.jan.fraction.operations.*;

/**
 * Created with IntelliJ IDEA.
 * User: cedrik
 * Date: 18.10.12
 * Time: 12:16
 * To change this template use File | Settings | File Templates.
 */
public class Test {
    public static void main(String[] args) {

        Fraction f;
        Fraction nf;
        Fraction ans;

        f = new Fraction(9,0);
        nf = new Fraction(5, 6);


        ans = (Fraction)f.operation(new Sum(new Fraction(1), new Fraction(3), new Fraction(5)));   // ans = f + nf;

        ans = (Fraction) new Sum(new Fraction(0)).apply(ans);

        System.out.println("дробь=" + ans + " сокрацено на " + ans.getDivider());

    }
}
